/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: xiaotutu
 * Date: 2024-12-22
 * Time: 21:06
 */
class Message<T> {
    private T message ;
    public T getMessage() {
        return message;
    }
    public void setMessage(T message) {
        this.message = message;
    }
}

public class Test3 {
    public static void main1(String[] args) {
        Message<String> message = new Message<>() ;
        message.setMessage("111111111");
        fun(message);

        Message<Integer> message2 = new Message<>() ;
        message2.setMessage(123);
        fun(message2);

    }

    public static void fun(Message<?> temp){
        //temp.setMessage(12); //不能进行元素的修改
        System.out.println(temp.getMessage());
    }
}
